<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   主题：急问：主成分回归分析SAS语句？  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/topic/6564/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466443554: Accept with keywords: (title(0.2):语句,回归,主题,成分,论坛, topn(0.2):RSS订阅,软件应用,方差,不在此列,回归方程,热门,帖子,作者,会员,标准化,用户名,结果,主站,新鲜事,成分,版面,数据,版权所有,分数,菜单,回归,样本,密码,总计,语句,主题,程序,普通,论坛,讨论区).-->
 </head>
 <body class="topic bbpress single single-topic postid-6564 single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    主题：急问：主成分回归分析SAS语句？
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-6564 topic type-topic status-publish hentry" id="post-6564">
        <header class="entry-header">
         <h1 class="entry-title">
          急问：主成分回归分析SAS语句？
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div class="bbp-breadcrumb">
           <p>
            <a class="bbp-breadcrumb-home" href="http://cos.name/cn/">
             COS论坛 | 统计之都
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-root" href="http://cos.name/cn/forums/">
             讨论区
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/software/">
             软件应用
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/software/sas/">
             SAS
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <span class="bbp-breadcrumb-current">
             急问：主成分回归分析SAS语句？
            </span>
           </p>
          </div>
          <div class="bbp-template-notice info">
           <p class="bbp-topic-description">
            该主题包含 3 条回复，4个帖子，最后由
            <a class="bbp-author-avatar" href="http://cos.name/cn/profile/20651/" rel="nofollow" title="查看conapika的档案">
             <img src="http://sdn.geekzu.org/avatar/d0fc4190abdb056552af937a85f518ce?s=14&amp;d=monsterid&amp;r=g"/>
            </a>
            <a class="bbp-author-name" href="http://cos.name/cn/profile/20651/" rel="nofollow" title="查看conapika的档案">
             conapika
            </a>
            在
            <a href="http://cos.name/cn/topic/6564/#post-227556" title="回复：急问：主成分回归分析SAS语句？">
             9 年 之前
            </a>
            更新。
           </p>
          </div>
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 4 个帖子 - 1 到 4（总计 4 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <ul class="forums bbp-replies" id="topic-6564-replies">
           <li class="bbp-header">
            <div class="bbp-reply-author">
             作者
            </div>
            <!-- .bbp-reply-author -->
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-header -->
           <li class="bbp-body">
            <div class="bbp-reply-header" id="post-6564">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年5月30日 上午2:45
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/6564/#post-6564">
               1 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-6564 -->
            <div class="odd bbp-parent-forum-998 bbp-parent-topic-6564 bbp-reply-position-1 user-id-8946 topic-author post-6564 topic type-topic status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/8946/" rel="nofollow" title="查看lovefederer2的档案">
               <img src="http://sdn.geekzu.org/avatar/524ebc22d1005d5706c4b76b638ab11c?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/8946/" rel="nofollow" title="查看lovefederer2的档案">
               lovefederer2
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               title 'Crime Rates per 100,000 Population by State';
               <br/>
               input State $1-15 Murder Rape Robbery Assault
               <br/>
               Burglary Larceny Auto_Theft;
               <br/>
               cards;
               <br/>
               Alabama        14.2 25.2  96.8 278.3 1135.5 1881.9 280.7
               <br/>
               Alaska         10.8 51.6  96.8 284.0 1331.7 3369.8 753.3
               <br/>
               Arizona         9.5 34.2 138.2 312.3 2346.1 4467.4 439.5
               <br/>
               Arkansas        8.8 27.6  83.2 203.4  972.6 1862.1 183.4
               <br/>
               California     11.5 49.4 287.0 358.0 2139.4 3499.8 663.5
               <br/>
               Colorado        6.3 42.0 170.7 292.9 1935.2 3903.2 477.1
               <br/>
               Connecticut     4.2 16.8 129.5 131.8 1346.0 2620.7 593.2
               <br/>
               Delaware        6.0 24.9 157.0 194.2 1682.6 3678.4 467.0
               <br/>
               Florida        10.2 39.6 187.9 449.1 1859.9 3840.5 351.4
               <br/>
               Georgia        11.7 31.1 140.5 256.5 1351.1 2170.2 297.9
               <br/>
               Hawaii          7.2 25.5 128.0  64.1 1911.5 3920.4 489.4
               <br/>
               Idaho           5.5 19.4  39.6 172.5 1050.8 2599.6 237.6
               <br/>
               Illinois        9.9 21.8 211.3 209.0 1085.0 2828.5 528.6
               <br/>
               Indiana         7.4 26.5 123.2 153.5 1086.2 2498.7 377.4
               <br/>
               Iowa            2.3 10.6  41.2  89.8  812.5 2685.1 219.9
               <br/>
               Kansas          6.6 22.0 100.7 180.5 1270.4 2739.3 244.3
               <br/>
               Kentucky       10.1 19.1  81.1 123.3  872.2 1662.1 245.4
               <br/>
               Louisiana      15.5 30.9 142.9 335.5 1165.5 2469.9 337.7
               <br/>
               Maine           2.4 13.5  38.7 170.0 1253.1 2350.7 246.9
               <br/>
               Maryland        8.0 34.8 292.1 358.9 1400.0 3177.7 428.5
               <br/>
               Massachusetts   3.1 20.8 169.1 231.6 1532.2 2311.3 1140.1
               <br/>
               Michigan        9.3 38.9 261.9 274.6 1522.7 3159.0 545.5
               <br/>
               Minnesota       2.7 19.5  85.9  85.8 1134.7 2559.3 343.1
               <br/>
               Mississippi    14.3 19.6  65.7 189.1  915.6 1239.9 144.4
               <br/>
               Missouri        9.6 28.3 189.0 233.5 1318.3 2424.2 378.4
               <br/>
               Montana         5.4 16.7  39.2 156.8  804.9 2773.2 309.2
               <br/>
               Nebraska        3.9 18.1  64.7 112.7  760.0 2316.1 249.1
               <br/>
               Nevada         15.8 49.1 323.1 355.0 2453.1 4212.6 559.2
               <br/>
               New Hampshire   3.2 10.7  23.2  76.0 1041.7 2343.9 293.4
               <br/>
               New Jersey      5.6 21.0 180.4 185.1 1435.8 2774.5 511.5
               <br/>
               New Mexico      8.8 39.1 109.6 343.4 1418.7 3008.6 259.5
               <br/>
               New York       10.7 29.4 472.6 319.1 1728.0 2782.0 745.8
               <br/>
               North Carolina 10.6 17.0  61.3 318.3 1154.1 2037.8 192.1
               <br/>
               North Dakota    0.9  9.0  13.3  43.8  446.1 1843.0 144.7
               <br/>
               Ohio            7.8 27.3 190.5 181.1 1216.0 2696.8 400.4
               <br/>
               Oklahoma        8.6 29.2  73.8 205.0 1288.2 2228.1 326.8
               <br/>
               Oregon          4.9 39.9 124.1 286.9 1636.4 3506.1 388.9
               <br/>
               Pennsylvania    5.6 19.0 130.3 128.0  877.5 1624.1 333.2
               <br/>
               Rhode Island    3.6 10.5  86.5 201.0 1489.5 2844.1 791.4
               <br/>
               South Carolina 11.9 33.0 105.9 485.3 1613.6 2342.4 245.1
               <br/>
               South Dakota    2.0 13.5  17.9 155.7  570.5 1704.4 147.5
               <br/>
               Tennessee      10.1 29.7 145.8 203.9 1259.7 1776.5 314.0
               <br/>
               Texas          13.3 33.8 152.4 208.2 1603.1 2988.7 397.6
               <br/>
               Utah            3.5 20.3  68.8 147.3 1171.6 3004.6 334.5
               <br/>
               Vermont         1.4 15.9  30.8 101.2 1348.2 2201.0 265.2
               <br/>
               Virginia        9.0 23.3  92.1 165.7  986.2 2521.2 226.7
               <br/>
               Washington      4.3 39.6 106.2 224.8 1605.6 3386.9 360.3
               <br/>
               West Virginia   6.0 13.2  42.2  90.9  597.4 1341.7 163.3
               <br/>
               Wisconsin       2.8 12.9  52.2  63.7  846.9 2614.2 220.7
               <br/>
               Wyoming         5.4 21.9  39.7 173.9  811.6 2772.2 282.0
               <br/>
               ;
              </p>
              <p>
               proc princomp out=Crime_Components;
               <br/>
               run;
              </p>
              <p>
               想得出有关犯罪的回归方程……
              </p>
              <p>
               弱问一句，SAS里直接实现主成分回归分析的语句吗？
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-226607">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年5月30日 下午3:48
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/6564/#post-226607">
               2 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-226607 -->
            <div class="even bbp-parent-forum-998 bbp-parent-topic-6564 bbp-reply-position-2 user-id-17284 post-226607 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/17284/" rel="nofollow" title="查看ant1的档案">
               <img src="http://sdn.geekzu.org/avatar/4c6c8d91403a5c449a40cb16e9d51d24?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/17284/" rel="nofollow" title="查看ant1的档案">
               ant1
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               Z1=0.3muder+0.432rape+0.397bobbery+0.397assult+0.44burglary+0.357larceny+0.295auto_theft
               <br/>
               Z2=-0.629muder-0.167rape+0.042bobbery-0.344assult+0.203burglary+0.402larceny+0.502auto_theft
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-227507">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年6月12日 下午7:10
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/6564/#post-227507">
               3 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-227507 -->
            <div class="odd bbp-parent-forum-998 bbp-parent-topic-6564 bbp-reply-position-3 user-id-2354 post-227507 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/2354/" rel="nofollow" title="查看zxcv_bnm的档案">
               <img src="http://sdn.geekzu.org/avatar/938d02bba07469b05048779692d33d05?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/2354/" rel="nofollow" title="查看zxcv_bnm的档案">
               zxcv_bnm
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               运行得
               <br/>
               看累计贡献率&gt;=85%即可
               <br/>
               Eigenvalues of the Correlation Matrix
              </p>
              <p>
               Eigenvalue    Difference    Proportion    Cumulative
              </p>
              <p>
               1    6.52720703    5.06230750        0.6527        0.6527
               <br/>
               2    1.46489954    0.45700617        0.1465        0.7992
               <br/>
               3    1.00789337    0.00789330        0.1008        0.9000
               <br/>
               4    1.00000006    1.00000006        0.1000        1.0000
               <br/>
               5    0.00000000    0.00000000        0.0000        1.0000
               <br/>
               6    0.00000000    0.00000000        0.0000        1.0000
               <br/>
               7    0.00000000    0.00000000        0.0000        1.0000
               <br/>
               8    0.00000000    0.00000000        0.0000        1.0000
               <br/>
               9    0.00000000    0.00000000        0.0000        1.0000
               <br/>
               10    0.00000000    0.00000000        0.0000        1.0000
               <br/>
               11    0.00000000    0.00000000        0.0000        1.0000
               <br/>
               12    0.00000000                      0.0000        1.0000
              </p>
              <p>
               Eigenvectors
              </p>
              <p>
               Prin1         Prin2         Prin3         Prin4         Prin5         Prin6
              </p>
              <p>
               n          0.377758      0.207491      -.073814       0.00000       0.00000       0.00000
               <br/>
               a          0.385380      -.144368      0.007914      -0.00007       0.00000       0.00000
               <br/>
               j          0.385380      -.144368      0.007914      -0.00007       0.00000       0.00000
               <br/>
               sumj       0.385380      -.144368      0.007914      -0.00007       0.00000       0.00000
               <br/>
               x          0.331876      0.436377      0.045974      -0.00000       0.00000       0.00000
               <br/>
               ak         0.385227      -.146136      0.009025       0.00022       0.00000       0.00000
               <br/>
               Prin1      0.391414      0.000000      0.000000       0.00000       0.00000       0.00000
               <br/>
               Prin2      0.000000      0.826221      0.000000      -0.00000       0.00000       0.00000
               <br/>
               Prin3      0.000000      0.000000      0.996077      -0.00000       0.00000       0.00000
               <br/>
               Prin4      -.000000      0.000000      0.000000       1.00000       0.00000       0.00000
               <br/>
               Prin5      0.000000      0.000000      0.000000       0.00000       1.00000       0.00000
               <br/>
               Prin6      0.000000      0.000000      0.000000       0.00000       0.00000       1.00000
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-227556">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2007年6月13日 上午8:37
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/6564/#post-227556">
               4 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-227556 -->
            <div class="even bbp-parent-forum-998 bbp-parent-topic-6564 bbp-reply-position-4 user-id-20651 post-227556 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/20651/" rel="nofollow" title="查看conapika的档案">
               <img src="http://sdn.geekzu.org/avatar/d0fc4190abdb056552af937a85f518ce?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/20651/" rel="nofollow" title="查看conapika的档案">
               conapika
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               由于数据单位不同,故将其标准化后在进行主成分分析;此外,我们会发现前三个主成分的累计方差贡献率&gt;85%(从下面结果看出),所以又对前三个主成分对样本进行分数排名.具体如下:
              </p>
              <p>
               程序:
               <br/>
               data Crime;
               <br/>
               input State $1-15 Murder Rape Robbery Assault
               <br/>
               Burglary Larceny Auto_Theft;
               <br/>
               cards;
               <br/>
               Alabama     14.2 25.2 96.8 278.3 1135.5 1881.9 280.7
               <br/>
               Alaska       10.8 51.6 96.8 284.0 1331.7 3369.8 753.3
               <br/>
               Arizona       9.5 34.2 138.2 312.3 2346.1 4467.4 439.5
               <br/>
               Arkansas     8.8 27.6 83.2 203.4 972.6 1862.1 183.4
               <br/>
               California   11.5 49.4 287.0 358.0 2139.4 3499.8 663.5
               <br/>
               Colorado     6.3 42.0 170.7 292.9 1935.2 3903.2 477.1
               <br/>
               Connecticut   4.2 16.8 129.5 131.8 1346.0 2620.7 593.2
               <br/>
               Delaware     6.0 24.9 157.0 194.2 1682.6 3678.4 467.0
               <br/>
               Florida     10.2 39.6 187.9 449.1 1859.9 3840.5 351.4
               <br/>
               Georgia     11.7 31.1 140.5 256.5 1351.1 2170.2 297.9
               <br/>
               Hawaii       7.2 25.5 128.0 64.1 1911.5 3920.4 489.4
               <br/>
               Idaho       5.5 19.4 39.6 172.5 1050.8 2599.6 237.6
               <br/>
               Illinois     9.9 21.8 211.3 209.0 1085.0 2828.5 528.6
               <br/>
               Indiana       7.4 26.5 123.2 153.5 1086.2 2498.7 377.4
               <br/>
               Iowa         2.3 10.6 41.2 89.8 812.5 2685.1 219.9
               <br/>
               Kansas       6.6 22.0 100.7 180.5 1270.4 2739.3 244.3
               <br/>
               Kentucky     10.1 19.1 81.1 123.3 872.2 1662.1 245.4
               <br/>
               Louisiana     15.5 30.9 142.9 335.5 1165.5 2469.9 337.7
               <br/>
               Maine       2.4 13.5 38.7 170.0 1253.1 2350.7 246.9
               <br/>
               Maryland     8.0 34.8 292.1 358.9 1400.0 3177.7 428.5
               <br/>
               Massachusetts   3.1 20.8 169.1 231.6 1532.2 2311.3 1140.1
               <br/>
               Michigan     9.3 38.9 261.9 274.6 1522.7 3159.0 545.5
               <br/>
               Minnesota     2.7 19.5 85.9 85.8 1134.7 2559.3 343.1
               <br/>
               Mississippi   14.3 19.6 65.7 189.1 915.6 1239.9 144.4
               <br/>
               Missouri     9.6 28.3 189.0 233.5 1318.3 2424.2 378.4
               <br/>
               Montana       5.4 16.7 39.2 156.8 804.9 2773.2 309.2
               <br/>
               Nebraska     3.9 18.1 64.7 112.7 760.0 2316.1 249.1
               <br/>
               Nevada       15.8 49.1 323.1 355.0 2453.1 4212.6 559.2
               <br/>
               New Hampshire   3.2 10.7 23.2 76.0 1041.7 2343.9 293.4
               <br/>
               New Jersey     5.6 21.0 180.4 185.1 1435.8 2774.5 511.5
               <br/>
               New Mexico     8.8 39.1 109.6 343.4 1418.7 3008.6 259.5
               <br/>
               New York     10.7 29.4 472.6 319.1 1728.0 2782.0 745.8
               <br/>
               North Carolina 10.6 17.0 61.3 318.3 1154.1 2037.8 192.1
               <br/>
               North Dakota   0.9 9.0 13.3 43.8 446.1 1843.0 144.7
               <br/>
               Ohio         7.8 27.3 190.5 181.1 1216.0 2696.8 400.4
               <br/>
               Oklahoma     8.6 29.2 73.8 205.0 1288.2 2228.1 326.8
               <br/>
               Oregon       4.9 39.9 124.1 286.9 1636.4 3506.1 388.9
               <br/>
               Pennsylvania   5.6 19.0 130.3 128.0 877.5 1624.1 333.2
               <br/>
               Rhode Island   3.6 10.5 86.5 201.0 1489.5 2844.1 791.4
               <br/>
               South Carolina 11.9 33.0 105.9 485.3 1613.6 2342.4 245.1
               <br/>
               South Dakota   2.0 13.5 17.9 155.7 570.5 1704.4 147.5
               <br/>
               Tennessee     10.1 29.7 145.8 203.9 1259.7 1776.5 314.0
               <br/>
               Texas       13.3 33.8 152.4 208.2 1603.1 2988.7 397.6
               <br/>
               Utah         3.5 20.3 68.8 147.3 1171.6 3004.6 334.5
               <br/>
               Vermont       1.4 15.9 30.8 101.2 1348.2 2201.0 265.2
               <br/>
               Virginia     9.0 23.3 92.1 165.7 986.2 2521.2 226.7
               <br/>
               Washington     4.3 39.6 106.2 224.8 1605.6 3386.9 360.3
               <br/>
               West Virginia   6.0 13.2 42.2 90.9 597.4 1341.7 163.3
               <br/>
               Wisconsin     2.8 12.9 52.2 63.7 846.9 2614.2 220.7
               <br/>
               Wyoming       5.4 21.9 39.7 173.9 811.6 2772.2 282.0
               <br/>
               ;
               <br/>
               proc princomp n=7 out=out2 std;
               <br/>
               var Murder Rape Robbery Assault Burglary Larceny Auto_Theft;
               <br/>
               run;
               <br/>
               proc print data=out2;
               <br/>
               var prin1-prin7;
               <br/>
               title 'the princomp score';
               <br/>
               run;
               <br/>
               proc sort data=out2;
               <br/>
               by prin1;
               <br/>
               run;
               <br/>
               proc print; id State;
               <br/>
               var prin1 Murder Rape Robbery Assault Burglary Larceny Auto_Theft;
               <br/>
               title'Analyze for prim1';
               <br/>
               run;
               <br/>
               proc sort data=out2;
               <br/>
               by prin2;
               <br/>
               run;
               <br/>
               proc print; id State;
               <br/>
               var prin1 Murder Rape Robbery Assault Burglary Larceny Auto_Theft;
               <br/>
               title'Analyze for prim2';
               <br/>
               run;
               <br/>
               proc sort data=out2;
               <br/>
               by prin3;
               <br/>
               run;
               <br/>
               proc print; id State;
               <br/>
               var prin1 Murder Rape Robbery Assault Burglary Larceny Auto_Theft;
               <br/>
               title'Analyze for prim3';
               <br/>
               run;
              </p>
              <p>
               运行结果:
               <br/>
               The PRINCOMP Procedure
              </p>
              <p>
               Eigenvalues of the Correlation Matrix
              </p>
              <p>
               Eigenvalue    Difference    Proportion    Cumulative
              </p>
              <p>
               1    4.17447791    3.14123234        0.5964        0.5964
               <br/>
               2    1.03324557    0.26223200        0.1476        0.7440
               <br/>
               3    0.77101357    0.33360488        0.1101        0.8541
               <br/>
               4    0.43740869    0.14717582        0.0625        0.9166
               <br/>
               5    0.29023287    0.13822385        0.0415        0.9581
               <br/>
               6    0.15200902    0.01039665        0.0217        0.9798
               <br/>
               7    0.14161237                               0.0202        1.0000
              </p>
              <p>
               Eigenvectors
              </p>
              <p>
               Prin1        Prin2        Prin3        Prin4        Prin5        Prin6        Prin7
              </p>
              <p>
               Murder         0.260133     0.734753     0.120318     0.559038     0.122760     0.179112     0.135343
               <br/>
               Rape           0.424312     0.156964     -.368719     -.108216     0.339878     -.630794     -.366386
               <br/>
               Robbery        0.401405     0.157117     0.377924     -.227353     -.736380     -.277872     0.014299
               <br/>
               Assault        0.409892     0.163223     -.241007     -.621543     0.169257     0.436024     0.377068
               <br/>
               Burglary       0.435312     -.282326     -.091181     0.201380     -.142232     0.525389     -.621019
               <br/>
               Larceny        0.367286     -.459151     -.322033     0.443881     -.132102     -.151337     0.559636
               <br/>
               Auto_Theft     0.314256     -.306014     0.732557     -.013284     0.510715     -.061246     0.078752
              </p>
              <p>
               结果分析:从上面可以看出,前三个主成分累计方差贡献率达0.8541&gt;85%,故可将前三个主成分看作对犯罪有显著联系;回归方程为:
               <br/>
               Prin1=0.260133Murder+0.424312Rape+0.401405Robbery+0.409892Assault+0.435312Burglary+0.367286Larceny+0.314256Auto_Theft;
               <br/>
               Prin2=0.734753Murder+0.156964Rape+0.157117Robbery+0.163223Assault-.282326Burglar-.459151Larceny-.306014Auto_Theft;
               <br/>
               prin3=0.120318Murder-.368719Rape+0.377924Robbery-.241007Assault -.091181Burglary -.322033Larceny+0.732557Auto_Theft
              </p>
              <p>
               另外,我们还可以得出分别以第一,二三主成分排名的州.以下给出以第一主成分得分排名的州:
               <br/>
               Analyze for prim1           14:38 Tuesday, April 6, 2004  27
              </p>
              <p>
               Auto_
               <br/>
               State              Prin1     Murder    Rape    Robbery    Assault    Burglary    Larceny     Theft
              </p>
              <p>
               North Carolin      .            .      10.6      17.0       61.3       318.3      1154.1    2037.8
               <br/>
               South Carolin      .            .      11.9      33.0      105.9       485.3      1613.6    2342.4
               <br/>
               North Dakota     -1.89517      0.9      9.0      13.3       43.8       446.1      1843.0     144.7
               <br/>
               West Virginia    -1.51788      6.0     13.2      42.2       90.9       597.4      1341.7     163.3
               <br/>
               South Dakota     -1.49205      2.0     13.5      17.9      155.7       570.5      1704.4     147.5
               <br/>
               Iowa             -1.21434      2.3     10.6      41.2       89.8       812.5      2685.1     219.9
               <br/>
               Wisconsin        -1.18654      2.8     12.9      52.2       63.7       846.9      2614.2     220.7
               <br/>
               New Hampshire    -1.16657      3.2     10.7      23.2       76.0      1041.7      2343.9     293.4
               <br/>
               Nebraska         -1.01051      3.9     18.1      64.7      112.7       760.0      2316.1     249.1
               <br/>
               Vermont          -0.96299      1.4     15.9      30.8      101.2      1348.2      2201.0     265.2
               <br/>
               Maine       2    -0.89910      0.4     13.5      38.7      170.0      1253.1      2350.7     246.9
               <br/>
               Kentucky         -0.83905     10.1     19.1      81.1      123.3       872.2      1662.1     245.4
               <br/>
               Idaho       5    -0.82026      0.5     19.4      39.6      172.5      1050.8      2599.6     237.6
               <br/>
               Pennsylvania     -0.80703      5.6     19.0     130.3      128.0       877.5      1624.1     333.2
               <br/>
               Montana          -0.76734      5.4     16.7      39.2      156.8       804.9      2773.2     309.2
               <br/>
               Mississippi      -0.74597     14.3     19.6      65.7      189.1       915.6      1239.9     144.4
               <br/>
               Minnesota        -0.71876      2.7     19.5      85.9       85.8      1134.7      2559.3     343.1
               <br/>
               Wyoming          -0.64825      5.4     21.9      39.7      173.9       811.6      2772.2     282.0
               <br/>
               Arkansas         -0.49198      8.8     27.6      83.2      203.4       972.6      1862.1     183.4
               <br/>
               Utah             -0.46134      3.5     20.3      68.8      147.3      1171.6      3004.6     334.5
               <br/>
               Virginia         -0.42751      9.0     23.3      92.1      165.7       986.2      2521.2     226.7
               <br/>
               Alabama     1    -0.33484      4.2     25.2      96.8      278.3      1135.5      1881.9     280.7
               <br/>
               Kansas           -0.27429      6.6     22.0     100.7      180.5      1270.4      2739.3     244.3
               <br/>
               Indiana          -0.21458      7.4     26.5     123.2      153.5      1086.2      2498.7     377.4
               <br/>
               Connecticut      -0.21088      4.2     16.8     129.5      131.8      1346.0      2620.7     593.2
               <br/>
               Oklahoma         -0.12864      8.6     29.2      73.8      205.0      1288.2      2228.1     326.8
               <br/>
               Georgia     1    -0.06605      1.7     31.1     140.5      256.5      1351.1      2170.2     297.9
               <br/>
               Tennessee        -0.04948     10.1     29.7     145.8      203.9      1259.7      1776.5     314.0
               <br/>
               State              Prin1     Murder    Rape    Robbery    Assault    Burglary    Larceny     Theft
              </p>
              <p>
               Rhode Island     -0.01400      3.6     10.5      86.5      201.0      1489.5      2844.1     791.4
               <br/>
               Ohio              0.15077      7.8     27.3     190.5      181.1      1216.0      2696.8     400.4
               <br/>
               New Jersey        0.15878      5.6     21.0     180.4      185.1      1435.8      2774.5     511.5
               <br/>
               Illinois          0.29008      9.9     21.8     211.3      209.0      1085.0      2828.5     528.6
               <br/>
               Missouri          0.30433      9.6     28.3     189.0      233.5      1318.3      2424.2     378.4
               <br/>
               Texas       1     0.36099      3.3     33.8     152.4      208.2      1603.1      2988.7     397.6
               <br/>
               Hawaii            0.41446      7.2     25.5     128.0       64.1      1911.5      3920.4     489.4
               <br/>
               Washington        0.50856      4.3     39.6     106.2      224.8      1605.6      3386.9     360.3
               <br/>
               Delaware          0.52107      6.0     24.9     157.0      194.2      1682.6      3678.4     467.0
               <br/>
               Louisiana         0.57120     15.5     30.9     142.9      335.5      1165.5      2469.9     337.7
               <br/>
               Massachusetts     0.57978      3.1     20.8     169.1      231.6      1532.2      2311.3    1140.1
               <br/>
               New Mexico        0.64693      8.8     39.1     109.6      343.4      1418.7      3008.6     259.5
               <br/>
               Oregon            0.77441      4.9     39.9     124.1      286.9      1636.4      3506.1     388.9
               <br/>
               Maryland          1.13796      8.0     34.8     292.1      358.9      1400.0      3177.7     428.5
               <br/>
               Michigan          1.15746      9.3     38.9     261.9      274.6      1522.7      3159.0     545.5
               <br/>
               Alaska            1.23110     10.8     51.6      96.8      284.0      1331.7      3369.8     753.3
               <br/>
               Florida     1     1.26752      0.2     39.6     187.9      449.1      1859.9      3840.5     351.4
               <br/>
               Colorado          1.28749      6.3     42.0     170.7      292.9      1935.2      3903.2     477.1
               <br/>
               Arizona           1.52164      9.5     34.2     138.2      312.3      2346.1      4467.4     439.5
               <br/>
               New York          1.74513     10.7     29.4     472.6      319.1      1728.0      2782.0     745.8
               <br/>
               California        2.14205     11.5     49.4     287.0      358.0      2139.4      3499.8     663.5
               <br/>
               Nevada            2.59368     15.8     49.1     323.1      355.0      2453.1      4212.6     559.2
              </p>
              <p>
               由于 North Carolin  和South Carolin缺失Murder数据,故无法进行排名,可以认为这两个州犯罪情况不严重,除去这两个州,我们可以得出North Dakota州的犯罪情况较轻(以第一主成分得分排名)
               <br/>
               由于版面问题,第二,三主成分得分排名不在此列出,LZ可以运行程序得出结果!
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
           </li>
           <!-- .bbp-body -->
           <li class="bbp-footer">
            <div class="bbp-reply-author">
             作者
            </div>
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-footer -->
          </ul>
          <!-- #topic-6564-replies -->
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 4 个帖子 - 1 到 4（总计 4 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <div class="bbp-no-reply" id="no-reply-6564">
           <div class="bbp-template-notice">
            <p>
             您必须先登录才能回复该主题。
            </p>
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
       <div class="comments-area" id="comments">
       </div>
       <!-- #comments -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>